package cn.hg.jbsa.admin.controller.system.validator;

import com.jfinal.core.Controller;

import cn.hg.jboot.core.validator.BaseValidator;

/**
 * @author 胡高
 * @date 2022/12/31
 */
public class JbsaChangePasswordValidator extends BaseValidator {

    /* (non-Javadoc)
     * @see com.jfinal.validate.Validator#handleError(com.jfinal.core.Controller)
     */
    @Override
    protected void handleError(Controller c) {

    }

    /* (non-Javadoc)
     * @see com.jfinal.validate.Validator#validate(com.jfinal.core.Controller)
     */
    @Override
    protected void validate(Controller c) {
        this.validateString("oldPassword", 6, 128, "oldPasswordMsg", "旧密码必须填写6到128长度的字符！");
        this.validateString("newPassword", 6, 128, "oldPasswordMsg", "新密码必须填写6到128长度的字符！");
        this.validateEqualField("newPassword", "confirmPassword", "confirmPasswordMsg", "确认密码必须和新密码相同！");
    }

}
